<?php
namespace WDB\Wrapper\User;
/**
 *
 * @author Richard Ejem <r.ejem9 gmail.com>
 */
class GalleryTable extends \WDB\Wrapper\Table
{
    protected function init()
    {
        parent::init();
        $imageColumn = new ImageColumn('productImage', $this, 'id_photo',
                new \ImageTarget(WWW_DIR.'/images/gallery/*.jpg', \Nette\Environment::getHttpRequest()->getUrl()->getBasePath().'/images/gallery/*.jpg', 546, 300));
        $imageColumn->webUIDisplayMode |= \WDB\WebUI\Column::DISPLAY_LIST;
        $imageColumn->imageResizeMode = \Nette\Image::EXACT;
        $imageColumn->setTitle('Obrázek');
        $this->addColumn($imageColumn);
    }
}
